package com.xiaoran.rabbitmq.demo.consumer;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

//接收消息
@Component
public class Confire_Consumer {

    @RabbitListener(queues = "confire_queue")
    public void recive(Message message){
        System.out.println("我们收到的消息是："+new String(message.getBody()));
    }

}
